import React, {useEffect} from 'react';
import {observer} from 'mobx-react';
import Table from './Table';
import Form from './Form';
import Log from './Log';
import store from './store';

export default observer(function () {
  useEffect(() => {
    store.fetchRecords()
  }, [])

  return (
    <React.Fragment>
      <Table/>
      {store.formVisible && <Form/>}
      {store.logVisible && <Log/>}
    </React.Fragment>
  )
})